<?
/*
 *   Pmail easy way to send emails
 *   Copyright (C) 2009  Felipe Theodoro Gonçalves (www.ftgoncalves.com)
 *
 *   This program is free software: you can redistribute it and/or modify
 *	 it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
?>
<?= $html->docType(); ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title><?= $title_for_layout; ?></title>
	<?= $html->charset(); ?>
	<?= $html->css('/pmail/css/styles'); ?>
	<?= $html->meta('icon', $html->url('/pmail/img/icon.gif'), array('type' => 'icon')); ?>
	<script type="text/javascript" src="<?= $html->url('/pmail/js/jquery.js') ?>"></script>
	<? if($session->check('Message.erro') or $session->check('Message.sucesso') or $session->check('Message.info')): ?>
		<script type="text/javascript" src="<?= $html->url('/pmail/js/corner.js') ?>"></script>
		<script type="text/javascript">
			$(function(){
				$('.message').corner('top br');
			});
		</script>
	<? endif; ?>
	<script type="text/javascript" src="<?= $html->url('/js/fckeditor/fckeditor.js') ?>"></script>
</head>
<body>
	<? ($session->check('Message.erro')) ? $session->flash('erro') : ''; ?>
	<? ($session->check('Message.sucesso')) ? $session->flash('sucesso') : ''; ?>
	<? ($session->check('Message.info')) ? $session->flash('info') : ''; ?>
<div id="container">
	<div id="header">
		<div id="sitename">
			<h1 style="background: url(<?= $html->url('/pmail/img/logo_full.png'); ?>) no-repeat 10px 10px; width: 184px; height: 70px; "></h1>
			<p class="bold"><?= __d('pmail', 'The easy way to send email'); ?></p>
			<p class="versao"><?= $version; ?></p>
		</div>
		<ul id="nav">
			<li <?= ($page == 'home') ? 'class="selected"' : '';?>><a href="<?= $html->url(array('plugin' => 'pmail', 'controller' => 'administrators', 'action' => 'index')); ?>" title="home page"><?= __d('pmail', 'home'); ?></a></li>
			<li <?= ($page == 'mails') ? 'class="selected"' : '';?>><a href="<?= $html->url(array('plugin' => 'pmail', 'controller' => 'mails', 'action' => 'index')); ?>" title="send mail"><?= __d('pmail', 'emails'); ?></a></li>
			<li <?= ($page == 'groups') ? 'class="selected"' : '';?>><a href="<?= $html->url(array('plugin' => 'pmail', 'controller' => 'groups', 'action' => 'index')); ?>" title="Groups"><?= __d('pmail', 'groups'); ?></a></li>
			<li <?= ($page == 'configs') ? 'class="selected"' : '';?>><a href="<?= $html->url(array('plugin' => 'pmail', 'controller' => 'configs', 'action' => 'index')); ?>" title="Configuração"><?= __d('pmail', 'configurations'); ?></a></li>
			<li <?= ($page == 'helps') ? 'class="selected"' : '';?>><a href="<?= $html->url(array('plugin' => 'pmail', 'controller' => 'helps', 'action' => 'index')); ?>" title="help"><?= __d('pmail', 'help'); ?></a></li>
		</ul>
	</div>
	<div id="content"><?= $content_for_layout; ?></div>
	<div id="footer">
		<p>PMail Copyright (C) 2007 <?= $html->link('Felipe Theodoro Gonçalves', 'http://www.ftgoncalves.com/', array('title' => 'ftgoncalves Developer Pleno')) ?> - <?= $html->link('license', 'http://www.opensource.org/licenses/gpl-3.0.html') ?></p>
		<p>
			Design: <?= $html->link('spyka webmaster', 'http://www.spyka.net', array('title' => 'spyka Webmaster')) ?>
			<?= $html->link('XHTML', 'http://validator.w3.org/check/referer', array('title' => 'valid XHTML strict')) ?> and
			<?= $html->link('CSS', 'http://jigsaw.w3.org/css-validator/check/referer', array('title' => 'CSS')) ?>
		</p>
		<p>
			<?= $html->image('/pmail/img/cake.power.gif') ?>
			<?= $html->image('/pmail/img/php5-power-micro.png') ?>
			<?= $html->link($html->image('http://www.antispam.br/campanha/antispam-micro-gray.png'), 'http://www.antispam.br/', array('alt' => 'Campanha antispam'), false, false) ?>
			<script type="text/javascript" src="http://www.ohloh.net/p/316795/widgets/project_thin_badge.js"></script>
		</p>
		<p>
			<?= $html->link($html->image('/pmail/img/br.gif'), array('plugin' => 'pmail', 'controller' => 'administrators', 'action' => 'set_language', 'pt_br'), array(), false, false); ?>
			<?= $html->link($html->image('/pmail/img/us.gif'), array('plugin' => 'pmail', 'controller' => 'administrators', 'action' => 'set_language', 'eng'), array(), false, false); ?>
		</p>
	</div>
</div>
</body>
</html>